package com.example.babybus.adapter

import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.example.babybus.config.constant.Constant

class BusStepAdapter: RecyclerView.Adapter<BusStepAdapter.BusStepHolder>() {
    class BusStepHolder(itemView: View): RecyclerView.ViewHolder(itemView)

    private val steps = mutableListOf<CustomBusStep>()

    fun setSteps(steps: List<CustomBusStep>) {
        this.steps.clear()
        this.steps.addAll(steps)
        notifyDataSetChanged()
    }

    override fun getItemCount(): Int {
        return steps.size
    }

    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): BusStepAdapter {
//        return BusStepHolder();
    }

    override fun onBindViewHolder(holder: BusStepHolder, position: Int) {
        val view = holder.itemView as BusStep
    }

}

data class CustomBusStep(@Constant.StepType val type: Int, val name: String)